package com.zx.notification.common.dao;

import com.zx.notification.common.model.NotificationTemplates;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface NotificationTemplatesMapper {
    int deleteByPrimaryKey(@Param("id") String id);

    int insert(NotificationTemplates row);

    int insertSelective(NotificationTemplates row);

    NotificationTemplates selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(NotificationTemplates row);

    int updateByPrimaryKeyWithBLOBs(NotificationTemplates row);

    int updateByPrimaryKey(NotificationTemplates row);

    Long getNotificationTemplatesListCount(@Param("templateCode") String templateCode,
                                           @Param("templateName") String templateName,
                                           @Param("bizType") String bizType,
                                           @Param("status") Integer status,
                                           @Param("createTimeStart") LocalDateTime createTimeStart,
                                           @Param("createTimeEnd") LocalDateTime createTimeEnd);

    List<NotificationTemplates> getNotificationTemplatesListByPage(@Param("templateCode") String templateCode,
                                                                   @Param("templateName") String templateName,
                                                                   @Param("bizType") String bizType,
                                                                   @Param("status") Integer status,
                                                                   @Param("createTimeStart") LocalDateTime createTimeStart,
                                                                   @Param("createTimeEnd") LocalDateTime createTimeEnd,
                                                                   @Param("pageNum") Long pageNum,
                                                                   @Param("pageSize") Long pageSize);

    NotificationTemplates selectByTemplateCode(@Param("templateCode") String templateCode);
}